home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / CyberDEFs 1.0.1 Folder / CyberDEFs / CyberDEFs.rsrc / TEXT_5914_œTechnical • œUse • ”Messaging.txt < prev    next >
Encoding:
Text File  |  1994-06-12  |  3.1 KB  |  75 lines

  1. SendCtlMsg is a short function included in the CyberDEFs package. When you license CyberDEF's, you'll receive C, Pascal and HyperTalk versions of its source code. Portions of our code can be pasted into your code in order to send your CDEFs the following messages.
  2.  
  3. Here are some messages you can send TextCDEF*:
  4.  
  5. NAME                 ID    PURPOSE
  6. --------------+---+-----------
  7. SetText             256   Set all text to handle passed
  8. GetSelect          257   Return handle to selection
  9. GetText             258   Return handle to all text
  10. Idle                   261   Flash caret
  11. Key                   262   Passed char replaces selection
  12. SetFont             265   Reset font to font number
  13. SetFSize            266   Reset font size
  14. FindStr              267   Select 1st occurance of string
  15. FindStrWrap    -267   Wrap-around find of string
  16. FindWord           269   Find whole word; don't wrap
  17. FindWordWrap  -269   Wrap to find word
  18. GetScroll           275   Set scrollbar & text
  19. SetScroll         -275   Return scroll position
  20. Cut                    277   Cut, put in clip & return text
  21. Copy                 278   Copy, clip & return text
  22. Paste                279   Paste & update scroll
  23. Clear                 280   Clear & return text
  24. Lock                  512   Lock item's portion of screen
  25. Unlock             -512   Unlock screen
  26. Resize              513   Resize & reset scroll, etc.
  27.  
  28. You'll  probably want to send messages to TextCDEF on these events:
  29.  
  30. NAME          ID    ACTIVITY
  31. ----------+--+--------------
  32. KeyDown     3      send chars to control with Key msg
  33. NullEvent     0      send Idle msg to control
  34.  
  35. * As long as you are using text with less than 32767 chars, you can do to TextCDEF just about anything you can do to any other TextEdit field‚Äîwith toolbox calls or manipulation of fields of the TE record.
  36.  
  37. **********
  38.  
  39. Here are some messages you can send PictCDEF:
  40.  
  41. NAME       ID   PURPOSE
  42. -------+----+---------
  43. SetPict   256  Set contents to handle passed
  44. GetPict   257  Return handle to picture
  45.  
  46. **********
  47.  
  48. Here are the messages you can send ListCDEF:
  49.  
  50. NAME               ID   PURPOSE
  51. ------------+----+---------
  52. SetText          256  Sets contents to text passed
  53. GetSelect        257  Returns selection path
  54. SetSelect          258  Changes text of selection
  55. OpenAll           259  Expands all items
  56. CloseAll          260  Collapses all items
  57. CheckAll         261  Checks all items
  58. UncheckAll      262  Unchecks all items
  59. GetChecked     263  Returns paths of checked
  60. ToggleSel        264  Toggles the selection's check
  61. Key                265  Toggles the selection's check
  62. SetSize           266  Set font size to value passed
  63. GetPartCode   267  Returns partcode
  64. CheckPath       268  Checks a line matching a path
  65. UncheckPath  -268  Unchecks a line
  66. OpenPath        269  Opens a line matching a path
  67. ClosePath      -269  Closes a line matching a path
  68. Resize            270  Resizes control to height & width
  69.  
  70. You'll  probably want to send messages to ListCDEF on these events:
  71.  
  72. NAME          ID    ACTIVITY
  73. ----------+--+--------------
  74. KeyDown     3      Send chars to control with Key msg
  75. NullEvent     0      Send Idle msg to control